#include <iostream>
#include <sstream>
#include <algorithm>

using namespace std;

int main()
{
	string line;
	
	getline(cin, line);
	
	stringstream ssin(line);
	
	string node;
	
	while (ssin >> node)
	{
		reverse(node.begin(), node.end());
		
		cout << node << endl;
	}
	
	return 0;
}